1. Plotting implicitly defined functions with Maple.
Many curves that arise in mathematics and its applications are described by equations which do not explicitly give one variable in terms of another. A simple example of this is the equation of a circle, which has the form
. A more interesting example is the Devil's Curve:
.
In order to plot a curve which is given explicitly, you must first tell Maple to read in the definition of some more advanced plotting commands. This is accomplished by executing the following command, which you should do now.
> with(plots):
Warning, the name changecoords has been redefined
You only need to execute this command once, and Maple will remember all the commands that it just loaded until you hit restart. Remember to execute this command each time you load the worksheet.
Next, you want Maple to do an implicit plot, using the implicitplot command, which you should lookup in the help, and use to plot the Devil's Curve above. Use an option grid=[100,100] , to get a better graph. The larger the grid, the better the plot, but the longer it takes Maple to execute it.
You can get Maple to solve for points on the curve as follows. Suppose you want to solve for all y values matching the x value x=0.1. Then type in something like
> eq:=subs(x=.1,y^4-x^4-y^2+2*x^2=0);
> solve(eq);
The answers will give you the approximate y-coordinates of points on the curve with x-coordinate 0.1. Choose the largest positive y-coordinate
, and then using a small viewing window containing the point (0.1,
) estimate the slope of the tangent line at this point. Then find an approximate equation for this tangent line.
Submission:
Plot the graph of the Devil's Curve over the viewing window x=-0..0.2.,y=0.8..1 Also, plot the approximate tangent line to the curve at the point specified above on the same axes.
Submission worksheet:
2. Solving implicitly defined functions for the variable.
Consider the Devil's Curve from the previous example. If you choose a small viewing window including the point (0.1, .99) then you will see that y is a function of x. Maple can help you solve the equation explicitly for y. To do this first define a variable as follows:
> eq:=y^4-x^4-y^2+2*x^2=0;
Then have Maple solve this equation for y .
> solve(eq,y);
Maple gives you four choices for the answer, corresponding to the four branches of the curve lying over x=0.1 that you saw in the original graph. Which one of these corresponds to the explicit solution at your point? Using the appropriate equation to define y as a function of x, have Maple differentiate the equation at x=0.1, and compare your calculated slope with the estimated slope from the previous problem.
Submission:
Submit the function you defined above, and your calculated derivative at 0.1, as well as a plot of the function, and its tangent line at x=0.1 on the same axes. Use the same viewing window as in problem 3.
Submission worksheet:
In this activity, we consider the Devil's Curve again, but this time, let us imagine that a particle is moving along the Devil's curve, so that its coordinates
x
and
y
are functions of the time coordinate
t
. This time, we want to study how the rates
and
are related. Let us define the Devil's Curve one more time.
> eq:=y^4-x^4-y^2+2*x^2=0;
Recall that when we applied the D operator to this equation, we got the following.
> D(eq);
At the time, we noted that Maple thinks of
x
and
y
as two functions, and thus thinks that
and
are their derivative functions. In that problem, we solved for
after setting
. For related rates problems, we simply adopt the same point of view as Maple, and treat
and
as functions of the variable
t,
which allows us to solve the related rate problem, which is given by assuming that
is some specific value at the point (x,y). Our goal is to find the value of D(y), given this information. To solve, we substitute the values of
,
x
and
y
into the above expression, and solve it for
. For example, let us find
at the point
if
. It is a little tricky, because the order of substitution can affect the outcome. For example, if we enter
> subs(x=.1,D(x)=5,D(eq));
then Maple substitutes x=.1 into the D(x) before it tries to substitute for the D(x). This can be overcome by substituting in a different order.
> subs(D(x)=5,x=.1,D(eq));
If we try to substitute y=
at the same time, we also run into a similar problem with the
. A solution is to solve the equation for
first, as we did in the previous activity and then substitute for
,
, and
, making sure to substitute the
before the
.
> ans:=solve(D(eq),D(y));
> subs(D(x)=5,x=.1,y=.9897915933,ans);
Notice that we already know that
at the point
P
, and by the chain rule, we have
. Thus we are not surprised that
, since
. Notice also that
, which you computed in the previous activity. This is another way to compute related rates, using the chain rule property that
. In other words, if you know
, and
, then you calculate
by just multiplying the two together. Verify this for the example above by using the value for
you computed in the previous activity.
Submission:
If
and
, find
when
, by the methods above. First compute
at the point in question. (Note that you will have to find the
x
values that correspond to the given
y
value, which may give more than one point.) Use the methods of activity 2 to do this computation. Then use the given value of
to find
. Next, use the methods in the example above to solve for
, without first computing
.
Submission worksheet: